package com.hpeng.basic.service;

import java.util.List;

import com.hpeng.sys.model.Category;
import com.hpeng.util.Pagination;


public interface CategoryManager {
	//根据Id自增
	public Category autoAddCategory(Category category);
	//找出所有的类别
	public List<Category> findCategory();
	//通过类别Id找出类别
	public Category findCategoryById(String id);
	//根据hql语句查出单条数据
	public Category findCategoryByHql(String hql);
	//增加类别
	public Category addCategory(Category category);
	//删除类别
	public void deleteCategory(Category category);
	//删除所有
	public void deleteAllCategory(String... ids);
	//修改类别
	public void updateCategory(Category category);
	//分页
	public Pagination<Category> getPagination(int pageSize, int pageNumber, String[] hql, String order);
	//自定义执行Hql语句
	public boolean executeBySql(String sql) throws Exception;
	/*
	 * 判断是否是末级节点并返回所有末级节点
	 */
	public String[] isLastLevelCategory(String[] stringArray);
	/*
	 * 判断数组中被资产卡片表使用的类别并返回没被使用的Id.
	 */
	public String[] getNoUse(String[] stringArray);
}
